
#!/usr/bin/python3
# -*- coding: utf-8 -*-
'''
<<<<<<< HEAD
# @file   : Cartesian.py
# @author : weichy
# @date   : 2018/12/30
# @version: 1.0
# @desc   :  52周存钱挑战
'''
def main():
    '''
    主函数
    '''
    money_per_week = 10 # 每周存入的金额
    i = 1 # 记录周数
    increase_money = 10  # 递增的金额
    total_week = 52 # 总共的周数
    saving = 0 # 账户累计

    while i <= total_week:
        saving +=  money_per_week

        #  输出信息
        print("第{}周，存入{}元，账户累计{}元。".format(i,money_per_week,saving))

        # 更新下一周的存入金额
        money_per_week += increase_money
        i += 1

if __name__ == '__main__':
    main()


=======
# @file   : money_challenge.py
# @author : weichy
# @date   : 2019/01/01
# @version: 1.0
# @desc   : 52周存钱挑战
'''

def main():
    """
    """
    money_per_week = 10  # 每周存入的金额
    i = 1 # 记录周数
    increase_moeny = 10 # 递增的金额
    total_week = 52 # 总共的周数
    saving = 0  # 账户累计
    while i<=total_week:
        # 存钱操作
        saving += money_per_week
        
        # 输出信息
        print('第{}周，存入{}元，账户累计{}元.'.format(i,money_per_week,saving))


        # 更新下一周的存钱金额
        money_per_week  +=  increase_moeny
        i += 1




if __name__ == '__main__':
    main()
>>>>>>> 87eaa653c0a49330a60813f3415548fa7a2596bd
